'use strict';

const merchantController = require('../../app/controller/merchant.controller.js');

module.exports = function(app) {
    app.route('/merchant/register')
        .post(merchantController.merchantRegister);

    app.route('/merchant/login')
        .post(merchantController.getMerchantByLogin);

    app.route('/merchant/getMerchantByIcnum/:icnum')
        .get(merchantController.getMerchantByIcnum); 

    app.route('/merchant/getMerchantStatus2ByIcnum/:icnum')
        .get(merchantController.getMerchantStatus2ByIcnum);  
          
    app.route('/merchant/merchantUpdate')
        .post(merchantController.merchantUpdate);

   app.route('/merchant/merchantUpdateFromA')
        .post(merchantController.merchantUpdateFromA);
    
    app.route('/merchant/openMerchant')
        .post(merchantController.openMerchant);
    
    app.route('/merchant/closeMerchant')
        .post(merchantController.closeMerchant);
};